/*
 * Created by JFormDesigner on Wed May 09 18:52:19 NOVT 2012
 */

package rndgen;

import java.awt.*;
import java.awt.event.*;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Random;

import javax.swing.*;


/**
 * @author alex
 */
public class Form extends JFrame {
	
	private static final long serialVersionUID = 6547316726376385408L;
	
	public Form() {
		initComponents();
	}

	private void menuItemCheckTestsActionPerformed(ActionEvent e) {
		try{
			if (sequence.isEmpty()) 
				throw new Exception();
		}catch(Exception ex){
			JOptionPane.showMessageDialog(null, "Sequence does not exist!", "Error...", JOptionPane.ERROR_MESSAGE);
			return;
		}
		
		//StatisticalTests statsTests = new StatisticalTests(sequence, lambda);
		StatisticalCriteries stCrit = new StatisticalCriteries(sequence, lambda);
		if (stats.getMaximum() == 0)
			stats.calcMaximum();
		if (stats.getMinimum() == 0)
			stats.calcMinimum();
		stCrit.chiSquare(0.1, stats.getMinimum(), stats.getMaximum());
		//labelChiStats.setText(Double.toString(statsTests.hi_krit));
		//labelChiDeg.setText(Integer.toString(statsTests.DegreeOfFreedom));
		//labelChiStatus.setText(statsTests.hi_st);
		labelChiStats.setText(Double.toString(stCrit.getStatValue()));
		labelChiDeg.setText(Integer.toString(stCrit.getDegreeOfFreedom()));
		labelChiStatus.setText(stCrit.getStatus());
		dialogTests.setVisible(true);
	}

	private void menuItemGenerateActionPerformed(ActionEvent e) {
		dialogGenerate.setVisible(true);
	}

	private void menuItemChartActionPerformed(ActionEvent e) {
		
			try {
				if (sequence.isEmpty())
					throw new Exception();
			} catch (Exception e1) {
				JOptionPane.showMessageDialog(null, "Sequence does not exist!", "Error...", JOptionPane.ERROR_MESSAGE);
				return;
			}
		dialogChart.setVisible(true);
	}

	private void menuItemShowStatsActionPerformed(ActionEvent e) {
		try{
			if (sequence.isEmpty()) 
				throw new Exception();
		}catch(Exception ex){
			JOptionPane.showMessageDialog(null, "Sequence does not exist!", "Error...", JOptionPane.ERROR_MESSAGE);
			return;
		}
			
		if (stats.getMeanValue() == 0)
			stats.calcMeanValue();
		if (stats.getVariance() == 0)
			stats.calcVariance();
		if (stats.getStandardDeviation() == 0)
			stats.calcStandardDeviation();
		if (stats.getStandardError() == 0)
			stats.calcStandardError();
		if (stats.getMode() == 0)
			stats.calcMode();
		if (stats.getMedian() == 0)
			stats.calcMedian();
		if (stats.getKurtosis() == 0)
			stats.calcKurtosis();
		if (stats.getSkewness() == 0)
			stats.calcSkewness();
		if (stats.getMaximum() == 0)
			stats.calcMaximum();
		if (stats.getMinimum() == 0)
			stats.calcMinimum();
		if (stats.getInterval() == 0)
			stats.calcInterval();
		if (stats.getSum() == 0)
			stats.calcSum();
		if (stats.getCount() == 0)
			stats.calcCount();
		labelMean.setText(String.format("%.4f", stats.getMeanValue()) + "");
		labelError.setText(String.format("%.4f", stats.getStandardError()) + "");
		labelDeviation.setText(String.format("%.4f", stats.getStandardDeviation()) + "");
		labelVar.setText(String.format("%.4f", stats.getVariance()) + "");
		labelMedian.setText(String.format("%.2f", stats.getMedian()) + "");
		labelMode.setText(String.format("%.2f", stats.getMode()) + "");
		labelKurtosis.setText(String.format("%.4f", stats.getKurtosis()) + "");
		labelSkewness.setText(String.format("%.4f", stats.getSkewness()) + "");
		labelInterval.setText(String.format("%.2f", stats.getInterval()) + "");
		labelMin.setText(String.format("%.2f", stats.getMinimum()) + "");
		labelMax.setText(String.format("%.2f", stats.getMaximum()) + "");
		labelSum.setText(String.format("%.2f", stats.getSum()) + "");
		labelCount.setText(stats.getCount() + "");
		dialogStats.setVisible(true);
	}

	private void menuItemExitActionPerformed(ActionEvent e) {
		System.exit(0);
	}

	private void buttonGenCancelActionPerformed(ActionEvent e) {
		dialogGenerate.setVisible(false);
	}

	private void buttonGenOkActionPerformed(ActionEvent e) {
		int size=0; 
		ArrayList<Double> seqTmp = null;
		try{
			size = Integer.parseInt(textFieldGenSize.getText());
			lambda = Double.parseDouble(textFieldGenLambda.getText());
			
		}
		catch (Exception ex){
			JOptionPane.showMessageDialog(null, "Incorrect values!", "Error...", JOptionPane.ERROR_MESSAGE);
			return;
		}
	
		try{
			RandomSequence rndseq = new RandomSequence();
			seqTmp = rndseq.getRandomSequenceWithExpDistribution(size, lambda);
			
		}
		catch(NullPointerException ex){
			JOptionPane.showMessageDialog(null, "Size of sequence must be positive!", "Error...", JOptionPane.ERROR_MESSAGE);
			return;
		}
		catch(NumberFormatException ex){
			JOptionPane.showMessageDialog(null, "Lambda must be positive!", "Error...", JOptionPane.ERROR_MESSAGE);
			return;
		}
		sequence.clear();
		sequence = seqTmp;
		textFieldFrom.setText("");
		textFieldTo.setText("");
		textAreaPartOfSeq.setText("");
		labelTotal.setText("Total: " + Integer.toString(size) + " elements");
		dialogGenerate.setVisible(false);
		stats = new Stats(sequence);
		stats.createDistribution();
		
	}

	private void buttonShowSeqActionPerformed(ActionEvent e) {
		int from = 0, to = 0;
		
		try{
			from = Integer.parseInt(textFieldFrom.getText());
			to = Integer.parseInt(textFieldTo.getText());
			if (sequence.isEmpty()) throw new IndexOutOfBoundsException();
			if (from > to || from < 1 || from > sequence.size() || to < 1 || to > sequence.size())
				throw new Exception();
		}
		catch (IndexOutOfBoundsException ex){
			JOptionPane.showMessageDialog(null, "Sequence does not exist!", "Error...", JOptionPane.ERROR_MESSAGE);
			return;
		}
		catch(Exception ex){
			JOptionPane.showMessageDialog(null, "Incorrect values!", "Error...", JOptionPane.ERROR_MESSAGE);
			return;
		}
		
		StringBuilder output = new StringBuilder("");
		
		for (int i = from-1; i <= to-1; i++)
			output.append(sequence.get(i).toString() + " ");
		
		textAreaPartOfSeq.setText(output.toString());
		
	}

	private void menuItemSaveSeqActionPerformed(ActionEvent e) {
		BufferedWriter out = null;
		
		try{
			if (sequence.isEmpty()) throw new Exception();
		}
		catch (Exception ex){
			JOptionPane.showMessageDialog(null, "Sequence does not exist!", "Error...", JOptionPane.ERROR_MESSAGE);
			return;
		}
		
		JFileChooser fch = new JFileChooser("C:\\");
		fch.showSaveDialog(null);
		File saveFile = fch.getSelectedFile();
		StringBuilder seq = new StringBuilder("");
		if (saveFile == null) return;
		
		for (int i = 0; i < sequence.size(); i++){
			if (i % 10 == 0 && i!=0) seq.append("\n");
			seq.append(sequence.get(i).toString() + " ");
		}
		
		try {
			
			out = new BufferedWriter (new FileWriter(saveFile));
			out.write(seq.toString());
			out.close();
			
		} catch (IOException e1) {
			JOptionPane.showMessageDialog(null, "Writing error!", "Error...", JOptionPane.ERROR_MESSAGE);
			return;
		}
		
			
		
	}

	private void menuItemSaveStatsActionPerformed(ActionEvent e) {
		BufferedWriter out = null;
		
		try{
			if (sequence.isEmpty()) 
				throw new Exception();
		}catch(Exception ex){
			JOptionPane.showMessageDialog(null, "Sequence does not exist!", "Error...", JOptionPane.ERROR_MESSAGE);
			return;
		}
			
		if (stats.getMeanValue() == 0)
			stats.calcMeanValue();
		if (stats.getVariance() == 0)
			stats.calcVariance();
		if (stats.getStandardDeviation() == 0)
			stats.calcStandardDeviation();
		if (stats.getStandardError() == 0)
			stats.calcStandardError();
		if (stats.getMode() == 0)
			stats.calcMode();
		if (stats.getMedian() == 0)
			stats.calcMedian();
		if (stats.getKurtosis() == 0)
			stats.calcKurtosis();
		if (stats.getSkewness() == 0)
			stats.calcSkewness();
		if (stats.getMaximum() == 0)
			stats.calcMaximum();
		if (stats.getMinimum() == 0)
			stats.calcMinimum();
		if (stats.getInterval() == 0)
			stats.calcInterval();
		if (stats.getSum() == 0)
			stats.calcSum();
		if (stats.getCount() == 0)
			stats.calcCount();
		
		JFileChooser fch = new JFileChooser("C:\\");
		fch.showSaveDialog(null);
		File saveFile = fch.getSelectedFile();
		if (saveFile == null) return;
		
		try {
			out = new BufferedWriter (new FileWriter(saveFile));
			out.write(stats.toString());
			out.close();
			
		} catch (IOException e1) {
			JOptionPane.showMessageDialog(null, "Writing error!", "Error...", JOptionPane.ERROR_MESSAGE);
			return;
		}
	}

	private void buttonChartShowActionPerformed(ActionEvent e) {
		final Chart chart = new Chart();
		if (stats.getMaximum() == 0)
			stats.calcMaximum();
		if (stats.getMinimum() == 0)
			stats.calcMinimum();
		try{
			double interval = Double.parseDouble(textFieldChartInterval.getText());
			if (interval <= 0) throw new Exception();
			chart.displayChart(sequence, interval, stats.getMinimum(), stats.getMaximum());	
		}
		catch(Exception ex){
			JOptionPane.showMessageDialog(null, "Incorrect value!", "Error...", JOptionPane.ERROR_MESSAGE);
			return;
		}
	    dialogChart.setVisible(false);
	}

	private void buttonChartCancelActionPerformed(ActionEvent e) {
		dialogChart.setVisible(false);
	}

	private void buttonGenOkKeyPressed(KeyEvent e) {
		// TODO add your code here
	}

	private void menuItemSaveTestsActionPerformed(ActionEvent e) {
		try{
			if (sequence.isEmpty()) 
				throw new Exception();
		}catch(Exception ex){
			JOptionPane.showMessageDialog(null, "Sequence does not exist!", "Error...", JOptionPane.ERROR_MESSAGE);
			return;
		}
	}
	
	

	

	private void initComponents() {
		// JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
		menuBar = new JMenuBar();
		menuSequence = new JMenu();
		menuItemGenerate = new JMenuItem();
		menuItemChart = new JMenuItem();
		menuItemSaveSeq = new JMenuItem();
		menuItemExit = new JMenuItem();
		menuStats = new JMenu();
		menuItemShowStats = new JMenuItem();
		menuItemSaveStats = new JMenuItem();
		menuTests = new JMenu();
		menuItemCheckTests = new JMenuItem();
		menuItemSaveTests = new JMenuItem();
		textFieldFrom = new JTextField();
		textFieldTo = new JTextField();
		scrollPane1 = new JScrollPane();
		textAreaPartOfSeq = new JTextArea();
		buttonShowSeq = new JButton();
		labelFrom = new JLabel();
		labelTo = new JLabel();
		labelPartOfSeq = new JLabel();
		labelTotal = new JLabel();
		dialogGenerate = new JDialog();
		label3 = new JLabel();
		label4 = new JLabel();
		buttonGenOk = new JButton();
		buttonGenCancel = new JButton();
		textFieldGenSize = new JTextField();
		textFieldGenLambda = new JTextField();
		dialogChart = new JDialog();
		labelChartInterval = new JLabel();
		textFieldChartInterval = new JTextField();
		buttonChartShow = new JButton();
		buttonChartCancel = new JButton();
		dialogStats = new JDialog();
		label6 = new JLabel();
		label7 = new JLabel();
		label8 = new JLabel();
		label9 = new JLabel();
		label10 = new JLabel();
		label11 = new JLabel();
		label12 = new JLabel();
		label13 = new JLabel();
		label14 = new JLabel();
		label15 = new JLabel();
		label16 = new JLabel();
		label17 = new JLabel();
		label18 = new JLabel();
		labelMean = new JLabel();
		labelError = new JLabel();
		labelDeviation = new JLabel();
		labelVar = new JLabel();
		labelMedian = new JLabel();
		labelMode = new JLabel();
		labelKurtosis = new JLabel();
		labelSkewness = new JLabel();
		labelInterval = new JLabel();
		labelMin = new JLabel();
		labelMax = new JLabel();
		labelSum = new JLabel();
		labelCount = new JLabel();
		dialogTests = new JDialog();
		tabbedPane1 = new JTabbedPane();
		panel1 = new JPanel();
		label19 = new JLabel();
		label20 = new JLabel();
		label21 = new JLabel();
		label22 = new JLabel();
		labelChiStats = new JLabel();
		labelChiDeg = new JLabel();
		labelChiSign = new JLabel();
		labelChiStatus = new JLabel();
		panel2 = new JPanel();
		label23 = new JLabel();
		label24 = new JLabel();
		label25 = new JLabel();
		label26 = new JLabel();
		labelKSStats = new JLabel();
		labelKSDeg = new JLabel();
		labelKSSign = new JLabel();
		labelKSStatus = new JLabel();
		panel3 = new JPanel();
		panel4 = new JPanel();
		label27 = new JLabel();
		label28 = new JLabel();
		label29 = new JLabel();
		label30 = new JLabel();
		labelMaxTStats = new JLabel();
		labelMaxTDeg = new JLabel();
		labelMaxTSign = new JLabel();
		labelMaxTStatus = new JLabel();

		//======== this ========
		setTitle("Random Generator");
		setResizable(false);
		Container contentPane = getContentPane();

		//======== menuBar ========
		{

			//======== menuSequence ========
			{
				menuSequence.setText("Sequence");

				//---- menuItemGenerate ----
				menuItemGenerate.setText("Generate");
				menuItemGenerate.addActionListener(new ActionListener() {
					@Override
					public void actionPerformed(ActionEvent e) {
						menuItemGenerateActionPerformed(e);
					}
				});
				menuSequence.add(menuItemGenerate);

				//---- menuItemChart ----
				menuItemChart.setText("Chart");
				menuItemChart.addActionListener(new ActionListener() {
					@Override
					public void actionPerformed(ActionEvent e) {
						menuItemChartActionPerformed(e);
					}
				});
				menuSequence.add(menuItemChart);

				//---- menuItemSaveSeq ----
				menuItemSaveSeq.setText("Save...");
				menuItemSaveSeq.addActionListener(new ActionListener() {
					@Override
					public void actionPerformed(ActionEvent e) {
						menuItemSaveSeqActionPerformed(e);
					}
				});
				menuSequence.add(menuItemSaveSeq);

				//---- menuItemExit ----
				menuItemExit.setText("Exit");
				menuItemExit.addActionListener(new ActionListener() {
					@Override
					public void actionPerformed(ActionEvent e) {
						menuItemExitActionPerformed(e);
					}
				});
				menuSequence.add(menuItemExit);
			}
			menuBar.add(menuSequence);

			//======== menuStats ========
			{
				menuStats.setText("Statistics");

				//---- menuItemShowStats ----
				menuItemShowStats.setText("Show");
				menuItemShowStats.addActionListener(new ActionListener() {
					@Override
					public void actionPerformed(ActionEvent e) {
						menuItemShowStatsActionPerformed(e);
					}
				});
				menuStats.add(menuItemShowStats);

				//---- menuItemSaveStats ----
				menuItemSaveStats.setText("Save...");
				menuItemSaveStats.addActionListener(new ActionListener() {
					@Override
					public void actionPerformed(ActionEvent e) {
						menuItemSaveStatsActionPerformed(e);
					}
				});
				menuStats.add(menuItemSaveStats);
			}
			menuBar.add(menuStats);

			//======== menuTests ========
			{
				menuTests.setText("Tests");

				//---- menuItemCheckTests ----
				menuItemCheckTests.setText("Check");
				menuItemCheckTests.addActionListener(new ActionListener() {
					@Override
					public void actionPerformed(ActionEvent e) {
						menuItemCheckTestsActionPerformed(e);
					}
				});
				menuTests.add(menuItemCheckTests);

				//---- menuItemSaveTests ----
				menuItemSaveTests.setText("Save...");
				menuItemSaveTests.addActionListener(new ActionListener() {
					@Override
					public void actionPerformed(ActionEvent e) {
						menuItemSaveTestsActionPerformed(e);
					}
				});
				menuTests.add(menuItemSaveTests);
			}
			menuBar.add(menuTests);
		}
		setJMenuBar(menuBar);

		//======== scrollPane1 ========
		{

			//---- textAreaPartOfSeq ----
			textAreaPartOfSeq.setEditable(false);
			textAreaPartOfSeq.setLineWrap(true);
			textAreaPartOfSeq.setFont(new Font("Monospaced", Font.PLAIN, 12));
			scrollPane1.setViewportView(textAreaPartOfSeq);
		}

		//---- buttonShowSeq ----
		buttonShowSeq.setText("Show");
		buttonShowSeq.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				buttonShowSeqActionPerformed(e);
			}
		});

		//---- labelFrom ----
		labelFrom.setText("From:");

		//---- labelTo ----
		labelTo.setText("To:");

		//---- labelPartOfSeq ----
		labelPartOfSeq.setText("Part of sequence:");

		//---- labelTotal ----
		labelTotal.setText("Total:");

		GroupLayout contentPaneLayout = new GroupLayout(contentPane);
		contentPane.setLayout(contentPaneLayout);
		contentPaneLayout.setHorizontalGroup(
			contentPaneLayout.createParallelGroup()
				.addGroup(contentPaneLayout.createSequentialGroup()
					.addContainerGap()
					.addGroup(contentPaneLayout.createParallelGroup()
						.addGroup(contentPaneLayout.createSequentialGroup()
							.addGroup(contentPaneLayout.createParallelGroup()
								.addComponent(labelPartOfSeq)
								.addComponent(scrollPane1, GroupLayout.DEFAULT_SIZE, 487, Short.MAX_VALUE)
								.addGroup(GroupLayout.Alignment.TRAILING, contentPaneLayout.createSequentialGroup()
									.addComponent(labelTotal)
									.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 354, Short.MAX_VALUE)
									.addComponent(buttonShowSeq, GroupLayout.PREFERRED_SIZE, 105, GroupLayout.PREFERRED_SIZE)))
							.addContainerGap())
						.addGroup(contentPaneLayout.createSequentialGroup()
							.addComponent(labelFrom)
							.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
							.addComponent(textFieldFrom, GroupLayout.PREFERRED_SIZE, 67, GroupLayout.PREFERRED_SIZE)
							.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
							.addComponent(labelTo)
							.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
							.addComponent(textFieldTo, GroupLayout.PREFERRED_SIZE, 67, GroupLayout.PREFERRED_SIZE))))
		);
		contentPaneLayout.setVerticalGroup(
			contentPaneLayout.createParallelGroup()
				.addGroup(contentPaneLayout.createSequentialGroup()
					.addContainerGap()
					.addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
						.addComponent(labelFrom)
						.addComponent(textFieldFrom, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
						.addComponent(labelTo)
						.addComponent(textFieldTo, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addGap(7, 7, 7)
					.addComponent(labelPartOfSeq)
					.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
					.addComponent(scrollPane1, GroupLayout.PREFERRED_SIZE, 132, GroupLayout.PREFERRED_SIZE)
					.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
					.addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
						.addComponent(buttonShowSeq)
						.addComponent(labelTotal))
					.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
		);
		pack();
		setLocationRelativeTo(getOwner());

		//======== dialogGenerate ========
		{
			dialogGenerate.setTitle("Generate");
			dialogGenerate.setResizable(false);
			Container dialogGenerateContentPane = dialogGenerate.getContentPane();

			//---- label3 ----
			label3.setText("Size:");

			//---- label4 ----
			label4.setText("Lambda:");

			//---- buttonGenOk ----
			buttonGenOk.setText("OK");
			buttonGenOk.addActionListener(new ActionListener() {
				@Override
				public void actionPerformed(ActionEvent e) {
					buttonGenOkActionPerformed(e);
				}
			});
			buttonGenOk.addKeyListener(new KeyAdapter() {
				@Override
				public void keyPressed(KeyEvent e) {
					buttonGenOkKeyPressed(e);
				}
			});

			//---- buttonGenCancel ----
			buttonGenCancel.setText("Cancel");
			buttonGenCancel.addActionListener(new ActionListener() {
				@Override
				public void actionPerformed(ActionEvent e) {
					buttonGenCancelActionPerformed(e);
				}
			});

			GroupLayout dialogGenerateContentPaneLayout = new GroupLayout(dialogGenerateContentPane);
			dialogGenerateContentPane.setLayout(dialogGenerateContentPaneLayout);
			dialogGenerateContentPaneLayout.setHorizontalGroup(
				dialogGenerateContentPaneLayout.createParallelGroup()
					.addGroup(dialogGenerateContentPaneLayout.createSequentialGroup()
						.addContainerGap()
						.addGroup(dialogGenerateContentPaneLayout.createParallelGroup()
							.addGroup(dialogGenerateContentPaneLayout.createSequentialGroup()
								.addComponent(buttonGenOk, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
								.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED))
							.addGroup(dialogGenerateContentPaneLayout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
								.addComponent(label4, GroupLayout.Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
								.addComponent(label3, GroupLayout.Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
						.addGroup(dialogGenerateContentPaneLayout.createParallelGroup()
							.addComponent(textFieldGenLambda, GroupLayout.Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 78, Short.MAX_VALUE)
							.addComponent(buttonGenCancel, GroupLayout.Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 78, Short.MAX_VALUE)
							.addComponent(textFieldGenSize, GroupLayout.Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 78, Short.MAX_VALUE))
						.addContainerGap())
			);
			dialogGenerateContentPaneLayout.setVerticalGroup(
				dialogGenerateContentPaneLayout.createParallelGroup()
					.addGroup(dialogGenerateContentPaneLayout.createSequentialGroup()
						.addContainerGap()
						.addGroup(dialogGenerateContentPaneLayout.createParallelGroup()
							.addComponent(label3)
							.addComponent(textFieldGenSize, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
						.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
						.addGroup(dialogGenerateContentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
							.addComponent(label4)
							.addComponent(textFieldGenLambda, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
						.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
						.addGroup(dialogGenerateContentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
							.addComponent(buttonGenOk)
							.addComponent(buttonGenCancel))
						.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
			);
			dialogGenerate.pack();
			dialogGenerate.setLocationRelativeTo(dialogGenerate.getOwner());
		}

		//======== dialogChart ========
		{
			dialogChart.setTitle("Chart");
			dialogChart.setResizable(false);
			Container dialogChartContentPane = dialogChart.getContentPane();

			//---- labelChartInterval ----
			labelChartInterval.setText("Interval:");

			//---- buttonChartShow ----
			buttonChartShow.setText("Show");
			buttonChartShow.addActionListener(new ActionListener() {
				@Override
				public void actionPerformed(ActionEvent e) {
					buttonChartShowActionPerformed(e);
				}
			});

			//---- buttonChartCancel ----
			buttonChartCancel.setText("Cancel");
			buttonChartCancel.addActionListener(new ActionListener() {
				@Override
				public void actionPerformed(ActionEvent e) {
					buttonChartCancelActionPerformed(e);
				}
			});

			GroupLayout dialogChartContentPaneLayout = new GroupLayout(dialogChartContentPane);
			dialogChartContentPane.setLayout(dialogChartContentPaneLayout);
			dialogChartContentPaneLayout.setHorizontalGroup(
				dialogChartContentPaneLayout.createParallelGroup()
					.addGroup(dialogChartContentPaneLayout.createSequentialGroup()
						.addContainerGap()
						.addGroup(dialogChartContentPaneLayout.createParallelGroup()
							.addGroup(dialogChartContentPaneLayout.createSequentialGroup()
								.addComponent(labelChartInterval)
								.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
								.addComponent(textFieldChartInterval, GroupLayout.DEFAULT_SIZE, 92, Short.MAX_VALUE))
							.addGroup(dialogChartContentPaneLayout.createSequentialGroup()
								.addComponent(buttonChartShow)
								.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
								.addComponent(buttonChartCancel)))
						.addContainerGap())
			);
			dialogChartContentPaneLayout.setVerticalGroup(
				dialogChartContentPaneLayout.createParallelGroup()
					.addGroup(dialogChartContentPaneLayout.createSequentialGroup()
						.addContainerGap()
						.addGroup(dialogChartContentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
							.addComponent(labelChartInterval)
							.addComponent(textFieldChartInterval, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
						.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
						.addGroup(dialogChartContentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
							.addComponent(buttonChartShow)
							.addComponent(buttonChartCancel))
						.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
			);
			dialogChart.pack();
			dialogChart.setLocationRelativeTo(dialogChart.getOwner());
		}

		//======== dialogStats ========
		{
			dialogStats.setTitle("Stats");
			dialogStats.setResizable(false);
			dialogStats.setAlwaysOnTop(true);
			Container dialogStatsContentPane = dialogStats.getContentPane();

			//---- label6 ----
			label6.setText("Mean value:");

			//---- label7 ----
			label7.setText("St. error:");

			//---- label8 ----
			label8.setText("St. deviation:");

			//---- label9 ----
			label9.setText("Variance:");

			//---- label10 ----
			label10.setText("Median:");

			//---- label11 ----
			label11.setText("Mode:");

			//---- label12 ----
			label12.setText("Kurtosis:");

			//---- label13 ----
			label13.setText("Skewness:");

			//---- label14 ----
			label14.setText("Interval:");

			//---- label15 ----
			label15.setText("Minimum:");

			//---- label16 ----
			label16.setText("Maximum:");

			//---- label17 ----
			label17.setText("Sum:");

			//---- label18 ----
			label18.setText("Unique:");

			//---- labelMean ----
			labelMean.setText("...");

			//---- labelError ----
			labelError.setText("...");

			//---- labelDeviation ----
			labelDeviation.setText("...");

			//---- labelVar ----
			labelVar.setText("...");

			//---- labelMedian ----
			labelMedian.setText("...");

			//---- labelMode ----
			labelMode.setText("...");

			//---- labelKurtosis ----
			labelKurtosis.setText("...");

			//---- labelSkewness ----
			labelSkewness.setText("...");

			//---- labelInterval ----
			labelInterval.setText("...");

			//---- labelMin ----
			labelMin.setText("...");

			//---- labelMax ----
			labelMax.setText("...");

			//---- labelSum ----
			labelSum.setText("...");

			//---- labelCount ----
			labelCount.setText("...");

			GroupLayout dialogStatsContentPaneLayout = new GroupLayout(dialogStatsContentPane);
			dialogStatsContentPane.setLayout(dialogStatsContentPaneLayout);
			dialogStatsContentPaneLayout.setHorizontalGroup(
				dialogStatsContentPaneLayout.createParallelGroup()
					.addGroup(dialogStatsContentPaneLayout.createSequentialGroup()
						.addContainerGap()
						.addGroup(dialogStatsContentPaneLayout.createParallelGroup()
							.addGroup(dialogStatsContentPaneLayout.createSequentialGroup()
								.addComponent(label6)
								.addGap(10, 10, 10)
								.addComponent(labelMean))
							.addGroup(dialogStatsContentPaneLayout.createSequentialGroup()
								.addComponent(label7)
								.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
								.addComponent(labelError))
							.addGroup(dialogStatsContentPaneLayout.createSequentialGroup()
								.addComponent(label8)
								.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
								.addComponent(labelDeviation))
							.addGroup(dialogStatsContentPaneLayout.createSequentialGroup()
								.addComponent(label9)
								.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
								.addComponent(labelVar))
							.addGroup(dialogStatsContentPaneLayout.createSequentialGroup()
								.addComponent(label10)
								.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
								.addComponent(labelMedian))
							.addGroup(dialogStatsContentPaneLayout.createSequentialGroup()
								.addComponent(label11)
								.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
								.addComponent(labelMode))
							.addGroup(dialogStatsContentPaneLayout.createSequentialGroup()
								.addComponent(label12)
								.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
								.addComponent(labelKurtosis))
							.addGroup(dialogStatsContentPaneLayout.createSequentialGroup()
								.addComponent(label13)
								.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
								.addComponent(labelSkewness))
							.addGroup(dialogStatsContentPaneLayout.createSequentialGroup()
								.addComponent(label14)
								.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
								.addComponent(labelInterval))
							.addGroup(dialogStatsContentPaneLayout.createSequentialGroup()
								.addComponent(label17)
								.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
								.addComponent(labelSum))
							.addGroup(dialogStatsContentPaneLayout.createSequentialGroup()
								.addComponent(label18)
								.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
								.addComponent(labelCount))
							.addGroup(dialogStatsContentPaneLayout.createSequentialGroup()
								.addGroup(dialogStatsContentPaneLayout.createParallelGroup()
									.addComponent(label15)
									.addComponent(label16))
								.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
								.addGroup(dialogStatsContentPaneLayout.createParallelGroup()
									.addComponent(labelMax)
									.addComponent(labelMin))))
						.addContainerGap(64, Short.MAX_VALUE))
			);
			dialogStatsContentPaneLayout.setVerticalGroup(
				dialogStatsContentPaneLayout.createParallelGroup()
					.addGroup(dialogStatsContentPaneLayout.createSequentialGroup()
						.addContainerGap()
						.addGroup(dialogStatsContentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
							.addComponent(label6)
							.addComponent(labelMean))
						.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
						.addGroup(dialogStatsContentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
							.addComponent(label7)
							.addComponent(labelError))
						.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
						.addGroup(dialogStatsContentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
							.addComponent(label8)
							.addComponent(labelDeviation))
						.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
						.addGroup(dialogStatsContentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
							.addComponent(label9)
							.addComponent(labelVar))
						.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
						.addGroup(dialogStatsContentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
							.addComponent(label10)
							.addComponent(labelMedian))
						.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
						.addGroup(dialogStatsContentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
							.addComponent(label11)
							.addComponent(labelMode))
						.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
						.addGroup(dialogStatsContentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
							.addComponent(label12)
							.addComponent(labelKurtosis))
						.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
						.addGroup(dialogStatsContentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
							.addComponent(label13)
							.addComponent(labelSkewness))
						.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
						.addGroup(dialogStatsContentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
							.addComponent(label14)
							.addComponent(labelInterval))
						.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
						.addGroup(dialogStatsContentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
							.addComponent(label15)
							.addComponent(labelMin))
						.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
						.addGroup(dialogStatsContentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
							.addComponent(label16)
							.addComponent(labelMax))
						.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
						.addGroup(dialogStatsContentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
							.addComponent(label17)
							.addComponent(labelSum))
						.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
						.addGroup(dialogStatsContentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
							.addComponent(label18)
							.addComponent(labelCount))
						.addContainerGap(13, Short.MAX_VALUE))
			);
			dialogStats.pack();
			dialogStats.setLocationRelativeTo(dialogStats.getOwner());
		}

		//======== dialogTests ========
		{
			dialogTests.setTitle("Tests");
			dialogTests.setResizable(false);
			dialogTests.setAlwaysOnTop(true);
			Container dialogTestsContentPane = dialogTests.getContentPane();

			//======== tabbedPane1 ========
			{

				//======== panel1 ========
				{

					//---- label19 ----
					label19.setText("Statistics:");

					//---- label20 ----
					label20.setText("Degree of freedom:");

					//---- label21 ----
					label21.setText("Significance:");

					//---- label22 ----
					label22.setText("Status:");

					//---- labelChiStats ----
					labelChiStats.setText("...");

					//---- labelChiDeg ----
					labelChiDeg.setText("...");

					//---- labelChiSign ----
					labelChiSign.setText("0.05");

					//---- labelChiStatus ----
					labelChiStatus.setText("...");

					GroupLayout panel1Layout = new GroupLayout(panel1);
					panel1.setLayout(panel1Layout);
					panel1Layout.setHorizontalGroup(
						panel1Layout.createParallelGroup()
							.addGroup(panel1Layout.createSequentialGroup()
								.addContainerGap()
								.addGroup(panel1Layout.createParallelGroup()
									.addGroup(panel1Layout.createSequentialGroup()
										.addComponent(label19)
										.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
										.addComponent(labelChiStats))
									.addGroup(panel1Layout.createSequentialGroup()
										.addComponent(label20)
										.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
										.addComponent(labelChiDeg))
									.addGroup(panel1Layout.createSequentialGroup()
										.addComponent(label21)
										.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
										.addComponent(labelChiSign))
									.addGroup(panel1Layout.createSequentialGroup()
										.addComponent(label22)
										.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
										.addComponent(labelChiStatus)))
								.addContainerGap(137, Short.MAX_VALUE))
					);
					panel1Layout.setVerticalGroup(
						panel1Layout.createParallelGroup()
							.addGroup(panel1Layout.createSequentialGroup()
								.addContainerGap()
								.addGroup(panel1Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
									.addComponent(label19)
									.addComponent(labelChiStats))
								.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
								.addGroup(panel1Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
									.addComponent(label20)
									.addComponent(labelChiDeg))
								.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
								.addGroup(panel1Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
									.addComponent(label21)
									.addComponent(labelChiSign))
								.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
								.addGroup(panel1Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
									.addComponent(label22)
									.addComponent(labelChiStatus))
								.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
					);
				}
				tabbedPane1.addTab("Chi-square", panel1);


				//======== panel2 ========
				{

					//---- label23 ----
					label23.setText("Statistics:");

					//---- label24 ----
					label24.setText("Degree of freedom:");

					//---- label25 ----
					label25.setText("Significance:");

					//---- label26 ----
					label26.setText("Status:");

					//---- labelKSStats ----
					labelKSStats.setText("...");

					//---- labelKSDeg ----
					labelKSDeg.setText("...");

					//---- labelKSSign ----
					labelKSSign.setText("...");

					//---- labelKSStatus ----
					labelKSStatus.setText("...");

					GroupLayout panel2Layout = new GroupLayout(panel2);
					panel2.setLayout(panel2Layout);
					panel2Layout.setHorizontalGroup(
						panel2Layout.createParallelGroup()
							.addGroup(panel2Layout.createSequentialGroup()
								.addContainerGap()
								.addGroup(panel2Layout.createParallelGroup()
									.addGroup(panel2Layout.createSequentialGroup()
										.addComponent(label23)
										.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
										.addComponent(labelKSStats))
									.addGroup(panel2Layout.createSequentialGroup()
										.addComponent(label24)
										.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
										.addComponent(labelKSDeg))
									.addGroup(panel2Layout.createSequentialGroup()
										.addComponent(label25)
										.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
										.addComponent(labelKSSign))
									.addGroup(panel2Layout.createSequentialGroup()
										.addComponent(label26)
										.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
										.addComponent(labelKSStatus)))
								.addContainerGap(137, Short.MAX_VALUE))
					);
					panel2Layout.setVerticalGroup(
						panel2Layout.createParallelGroup()
							.addGroup(panel2Layout.createSequentialGroup()
								.addContainerGap()
								.addGroup(panel2Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
									.addComponent(label23)
									.addComponent(labelKSStats))
								.addGap(6, 6, 6)
								.addGroup(panel2Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
									.addComponent(label24)
									.addComponent(labelKSDeg))
								.addGap(6, 6, 6)
								.addGroup(panel2Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
									.addComponent(label25)
									.addComponent(labelKSSign))
								.addGap(6, 6, 6)
								.addGroup(panel2Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
									.addComponent(label26)
									.addComponent(labelKSStatus))
								.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
					);
				}
				tabbedPane1.addTab("Kolmogorov-Smirnov", panel2);


				//======== panel3 ========
				{

					//======== panel4 ========
					{

						//---- label27 ----
						label27.setText("Statistics:");

						//---- label28 ----
						label28.setText("Degree of freedom:");

						//---- label29 ----
						label29.setText("Significance:");

						//---- label30 ----
						label30.setText("Status:");

						//---- labelMaxTStats ----
						labelMaxTStats.setText("...");

						//---- labelMaxTDeg ----
						labelMaxTDeg.setText("...");

						//---- labelMaxTSign ----
						labelMaxTSign.setText("...");

						//---- labelMaxTStatus ----
						labelMaxTStatus.setText("...");

						GroupLayout panel4Layout = new GroupLayout(panel4);
						panel4.setLayout(panel4Layout);
						panel4Layout.setHorizontalGroup(
							panel4Layout.createParallelGroup()
								.addGroup(panel4Layout.createSequentialGroup()
									.addContainerGap()
									.addGroup(panel4Layout.createParallelGroup()
										.addGroup(panel4Layout.createSequentialGroup()
											.addComponent(label27)
											.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
											.addComponent(labelMaxTStats))
										.addGroup(panel4Layout.createSequentialGroup()
											.addComponent(label28)
											.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
											.addComponent(labelMaxTDeg))
										.addGroup(panel4Layout.createSequentialGroup()
											.addComponent(label29)
											.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
											.addComponent(labelMaxTSign))
										.addGroup(panel4Layout.createSequentialGroup()
											.addComponent(label30)
											.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
											.addComponent(labelMaxTStatus)))
									.addContainerGap(137, Short.MAX_VALUE))
						);
						panel4Layout.setVerticalGroup(
							panel4Layout.createParallelGroup()
								.addGroup(panel4Layout.createSequentialGroup()
									.addContainerGap()
									.addGroup(panel4Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
										.addComponent(label27)
										.addComponent(labelMaxTStats))
									.addGap(6, 6, 6)
									.addGroup(panel4Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
										.addComponent(label28)
										.addComponent(labelMaxTDeg))
									.addGap(6, 6, 6)
									.addGroup(panel4Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
										.addComponent(label29)
										.addComponent(labelMaxTSign))
									.addGap(6, 6, 6)
									.addGroup(panel4Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
										.addComponent(label30)
										.addComponent(labelMaxTStatus))
									.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
						);
					}

					GroupLayout panel3Layout = new GroupLayout(panel3);
					panel3.setLayout(panel3Layout);
					panel3Layout.setHorizontalGroup(
						panel3Layout.createParallelGroup()
							.addGroup(panel3Layout.createParallelGroup()
								.addGroup(panel3Layout.createSequentialGroup()
									.addGap(0, 0, Short.MAX_VALUE)
									.addComponent(panel4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
									.addGap(0, 0, Short.MAX_VALUE)))
							.addGap(0, 260, Short.MAX_VALUE)
					);
					panel3Layout.setVerticalGroup(
						panel3Layout.createParallelGroup()
							.addGroup(panel3Layout.createParallelGroup()
								.addGroup(panel3Layout.createSequentialGroup()
									.addGap(0, 0, Short.MAX_VALUE)
									.addComponent(panel4, GroupLayout.PREFERRED_SIZE, 95, GroupLayout.PREFERRED_SIZE)
									.addGap(0, 0, Short.MAX_VALUE)))
							.addGap(0, 95, Short.MAX_VALUE)
					);
				}
				tabbedPane1.addTab("Serial cor.", panel3);

			}

			GroupLayout dialogTestsContentPaneLayout = new GroupLayout(dialogTestsContentPane);
			dialogTestsContentPane.setLayout(dialogTestsContentPaneLayout);
			dialogTestsContentPaneLayout.setHorizontalGroup(
				dialogTestsContentPaneLayout.createParallelGroup()
					.addGroup(dialogTestsContentPaneLayout.createSequentialGroup()
						.addContainerGap()
						.addComponent(tabbedPane1, GroupLayout.PREFERRED_SIZE, 265, GroupLayout.PREFERRED_SIZE)
						.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
			);
			dialogTestsContentPaneLayout.setVerticalGroup(
				dialogTestsContentPaneLayout.createParallelGroup()
					.addGroup(dialogTestsContentPaneLayout.createSequentialGroup()
						.addContainerGap()
						.addComponent(tabbedPane1, GroupLayout.PREFERRED_SIZE, 120, GroupLayout.PREFERRED_SIZE)
						.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
			);
			dialogTests.pack();
			dialogTests.setLocationRelativeTo(dialogTests.getOwner());
		}
		// JFormDesigner - End of component initialization  //GEN-END:initComponents
	}

	// JFormDesigner - Variables declaration - DO NOT MODIFY  //GEN-BEGIN:variables
	private JMenuBar menuBar;
	private JMenu menuSequence;
	private JMenuItem menuItemGenerate;
	private JMenuItem menuItemChart;
	private JMenuItem menuItemSaveSeq;
	private JMenuItem menuItemExit;
	private JMenu menuStats;
	private JMenuItem menuItemShowStats;
	private JMenuItem menuItemSaveStats;
	private JMenu menuTests;
	private JMenuItem menuItemCheckTests;
	private JMenuItem menuItemSaveTests;
	private JTextField textFieldFrom;
	private JTextField textFieldTo;
	private JScrollPane scrollPane1;
	private JTextArea textAreaPartOfSeq;
	private JButton buttonShowSeq;
	private JLabel labelFrom;
	private JLabel labelTo;
	private JLabel labelPartOfSeq;
	private JLabel labelTotal;
	private JDialog dialogGenerate;
	private JLabel label3;
	private JLabel label4;
	private JButton buttonGenOk;
	private JButton buttonGenCancel;
	private JTextField textFieldGenSize;
	private JTextField textFieldGenLambda;
	private JDialog dialogChart;
	private JLabel labelChartInterval;
	private JTextField textFieldChartInterval;
	private JButton buttonChartShow;
	private JButton buttonChartCancel;
	private JDialog dialogStats;
	private JLabel label6;
	private JLabel label7;
	private JLabel label8;
	private JLabel label9;
	private JLabel label10;
	private JLabel label11;
	private JLabel label12;
	private JLabel label13;
	private JLabel label14;
	private JLabel label15;
	private JLabel label16;
	private JLabel label17;
	private JLabel label18;
	private JLabel labelMean;
	private JLabel labelError;
	private JLabel labelDeviation;
	private JLabel labelVar;
	private JLabel labelMedian;
	private JLabel labelMode;
	private JLabel labelKurtosis;
	private JLabel labelSkewness;
	private JLabel labelInterval;
	private JLabel labelMin;
	private JLabel labelMax;
	private JLabel labelSum;
	private JLabel labelCount;
	private JDialog dialogTests;
	private JTabbedPane tabbedPane1;
	private JPanel panel1;
	private JLabel label19;
	private JLabel label20;
	private JLabel label21;
	private JLabel label22;
	private JLabel labelChiStats;
	private JLabel labelChiDeg;
	private JLabel labelChiSign;
	private JLabel labelChiStatus;
	private JPanel panel2;
	private JLabel label23;
	private JLabel label24;
	private JLabel label25;
	private JLabel label26;
	private JLabel labelKSStats;
	private JLabel labelKSDeg;
	private JLabel labelKSSign;
	private JLabel labelKSStatus;
	private JPanel panel3;
	private JPanel panel4;
	private JLabel label27;
	private JLabel label28;
	private JLabel label29;
	private JLabel label30;
	private JLabel labelMaxTStats;
	private JLabel labelMaxTDeg;
	private JLabel labelMaxTSign;
	private JLabel labelMaxTStatus;
	// JFormDesigner - End of variables declaration  //GEN-END:variables
	private ArrayList<Double> sequence = new ArrayList<Double>();
	private Stats stats = null;
	private double lambda = 0;
}

